package com.ch.android.networklib

/**
 * Author: conghao
 * Date: 2024/1/10 16:23
 * Description: Singleton
 */
class Singleton private constructor() {
    companion object {
        @Volatile private var instance: Singleton? = null

        fun getInstance(): Singleton {
            if (instance == null) {
                synchronized(Singleton::class) {
                    if (instance == null) {
                        instance = Singleton()
                    }
                }
            }
            return instance!!
        }
    }
}